<html>
    <head>
        <title> /!\ Welcome to MegaSoft ERP SYSTEM </title>
		<meta name="layout" content="main" />
    </head>
    <body>
        <h1 style="margin-left:20px;">Search</h1>
        <p style="margin-left:20px;">Here you can search for projects and courses at your Department.</br>
        Please select what search criteria you want to use.</p>
        <div class="dialog" style="margin-left:20px;width:60%;">
          <div class="box" style="width:350px;">
          <form action="/MegaSoft/search/show">
            <h2 style="margin-bottom:10px;">Search Criteria:</h2>
            <g:radioGroup name="searchCriteria" value="name" labels="['Course Area','Project or Course Name','Project or Course Id']" values="['area','name','activityId']" >
            <p>${it.radio} ${it.label}</p>
            </g:radioGroup>
            <p><br />
            <input type="text" name="keyword" id="keyword" value="" />
            <input type="submit" value="Search" />
            </p>
          </form>
          </div>
          <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
          </g:if>
          <g:if test="${courseList && session?.container && Container.get(session?.container)?.hasTab('Course') && ! (session?.access?.role?.description?.equalsIgnoreCase('Lab Leader'))}">
            <h2>Courses</h2>
            <ul>
              <g:each var="m" in="${courseList}">
                <li>${m?.name}</li>
              </g:each>
            </ul>
          </g:if>
          <g:if test="${projectList && session?.container && Container.get(session?.container)?.hasTab('Project') && ! (session?.access?.role?.description?.equalsIgnoreCase('Director Of Study'))}">
            <h2>Projects</h2>
            <ul>
              <g:each var="m" in="${projectList}">
                <li>${m?.name}</li>
              </g:each>
            </ul>
          </g:if>
        </div>
    </body>
</html>
